Skip to main content

State

Queries state information for the router.

query State {
router {
state {
id
admin
constant_product_vlp_code_id
stable_vlp_code_id
virtual_balance_address
locked
}
}
}

Example

curl --request POST \
--header 'content-type: application/json' \
--url 'https://api.euclidprotocol.com/graphql' \
--data '{"query":"query State {\n router {\n state {\n id\n admin\n constant_product_vlp_code_id\n stable_vlp_code_id\n virtual_balance_address\n locked\n }\n }\n}"}'

Open in Playground

Example Response

{
"data": {
"router": {
"state": {
"id": "ContractStateOfRouter:singleton",
"admin": "euclid1z328t58xya5hw32a869n6hah33uaehw5zz9rj3",
"constant_product_vlp_code_id": 8,
"stable_vlp_code_id": 9,
"virtual_balance_address": "euclid1zwv6feuzhy6a9wekh96cd57lsarmqlwxdypdsplw6zhfncqw6ftqw54q5a",
"locked": false
}
}
}
}

Return Fields

FieldTypeDescription
idStringThe singleton identifier for the router state object.
adminStringThe admin address of the router.
constant_product_vlp_code_idIntThe code ID used for constant product VLP deployments.
stable_vlp_code_idIntThe code ID used for stable VLP deployments.
virtual_balance_addressStringThe address of the VBalance contract.
lockedBooleanWhether the router is currently locked.